import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;


public class ServidorCliente extends Thread{


	public void run() {  

		try {  

			ServerSocket server = new ServerSocket(7777);  
			System.out.println("ServidorSocket rodando na porta 7777");     

			while (true) {   

				Socket conexao = server.accept();   
				Thread f = new Fala(conexao);  
				f.start();  
				Thread e = new Escuta(conexao);  
				e.start();  
				

			} 			
			
			
			
		} catch (IOException e) {
			System.err.println("IOException: " + e);  
		}  
	}  
}
